/*
 * An instance of this class will hold information about a player's statistics for a game.
 */

#ifndef GAMESTATISTIC_H
#define GAMESTATISTIC_H

#include <QString>

class GameStatistic
{
public:
    GameStatistic();
    GameStatistic(GameStatistic* other);
    ~GameStatistic();
    QString* getDate();
    QString* setDate(QString *inputDate);
    //offensive stat methods
    int getAtBats();
    void setAtBats(int inputAtBats);
    void incrementAtBats();
    int getSingles();
    void setSingles(int inputSingles);
    void incrementSingles();
    int getDoubles();
    void setDoubles(int inputDoubles);
    void incrementDoubles();
    int getTriples();
    void setTriples(int inputTriples);
    void incrementTriples();
    int getHomeRuns();
    void setHomeRuns(int inputHomeruns);
    void incrementHomeRuns();
    int getHits();
    double getBattingAverage();
    double getOnBasePercentage();
    int getRunsScored();
    void setRunsScored(int inputRunsScored);
    void incrementRunsScored();
    int getRunsBattedIn();
    void setRunsBattedIn(int inputRunsBattedIn);
    void increaseRunsBattedIn(int inputRunsBattedIn);
    void incrementRunsBattedIn();
    int getStolenBases();
    void setStolenBases(int inputStolenBases);
    void incrementStolenBases();
    int getSacrificeFlys();
    void setSacrificeFlys(int inputSacrificeFlys);
    void incrementSacrificeFlys();
    int getGrandSlams();
    void setGrandSlams(int inputGrandSlams);
    void incrementGrandSlams();
    int getWalks();
    void setWalks(int inputWalks);
    void incrementWalks();
    int getStrikeouts();
    void setStrikeouts(int inputStrikeouts);
    void incrementStrikeouts();

    //pitching stats
    int getWalksPitched();
    void setWalksPitched(int inputWalksPitched);
    void incrementWalksPitched();
    int getEarnedRuns();
    void setEarnedRuns(int inputEarnedRuns);
    void incrementEarnedRuns();
    double getInningsPitched();
    void setInningsPitched(double inputInningsPitched);
    void incrementInningsPitched();
    double getEarnedRunAverage();
    int getStrikeoutsPitched();
    void setStrikeoutsPitched(int inputStrikeoutsPitched);
    void incrementStrikeoutsPitched();
    int getWins();
    void setWins(int inputWins);
    void incrementWins();
    int getLosses();
    void setLosses(int inputLosses);
    void incrementLosses();
    int getHitsAllowed();
    void setHitsAllowed(int inputHitsAllowed);
    void incrementHitsAllowed();
    int getAtBatsFaced();
    void setAtBatsFaced(int inputAtBatsFaced);
    void incrementAtBatsFaced();
    double getOpponentsBattingAverage();

    //defensive
    int getErrors();
    void setErrors(int inputErrors);
    void incrementErrors();

private:
    QString *date; //date encoded as MMDDYYYY
    int atBats;
    int singles;
    int doubles;
    int triples;
    int grandSlams;
    int homeruns;
    int walks;
    int strikeouts;
    int runsScored;
    int runsBattedIn;
    int stolenBases;
    int sacrificeFlys;

    //pitching stats
    int walksPitched;
    int earnedRuns;
    double inningsPitched;
    int strikeoutsPitched;
    int wins;
    int losses;
    int hitsAllowed;
    int atBatsFaced;

    //defensive
    int errors;

};

#endif // GAMESTATISTIC_H
